﻿using Microsoft.IdentityModel.Configuration;
using Microsoft.IdentityModel.SecurityTokenService;
using System.Security.Cryptography.X509Certificates;
using Veracruz.IdentityModel;

namespace Veracruz.Facebook.IdentityModel
{
    public class FacebookSecurityTokenServiceConfiguration : SecurityTokenServiceConfiguration
    {
        #region consts

        //public const string IssuerAddress = "http://facebook.veracruz.org";
        public const string IssuerAddress = "http://localhost";

        #endregion
        #region ctors

        public FacebookSecurityTokenServiceConfiguration()
            : base(IssuerAddress, new X509SigningCredentials(CertificateHelper.GetCertificate(StoreName.My, StoreLocation.LocalMachine, Veracruz.Configuration.VeracruzSection.Instance.ApplicationSecurity.EncryptionCertificateName)))
        {
            SecurityTokenService = typeof(FacebookSecurityTokenService);
        }

        #endregion
    }
}
